package com.qf.hospital.system.service.impl;

import com.qf.hospital.system.entity.RegisteredType;
import com.qf.hospital.system.mapper.RegisteredTypeMapper;
import com.qf.hospital.system.service.RegisteredTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RegisteredTypeServiceImpl implements RegisteredTypeService {

    @Autowired
    private RegisteredTypeMapper registeredTypeMapper;


    @Override
    public List<RegisteredType> findAll() {
        return registeredTypeMapper.findAll();
    }

    @Override
    public Double findPriceByRegisteredId(Integer registeredId) {
        return registeredTypeMapper.selectByPrimaryKey(registeredId).getPrice();
    }
}
